import Vuex from 'vuex'

export default new Vuex.Store({
    // 管理 数据
    state: {
        user: null,
        authorities: [], // 权限列表
    },
    mutations: { // 同步调用
        updateUser(state, user) {
            state.user = user;
        },
        modifyAuthorities(state, authorities) {
            state.authorities = authorities ;
        }
    },
    actions: { // 异步调用

    }

});